package com.ts.common.bean;
/**
 * 
 * @author zhangfeng
 *
 */
public class ResponResult {
	
	/**
	 * 成功
	 */
	public final static String RESULT_SUCCESS = "Y";
	
	/**
	 * 失败
	 */
	public final static String RESULT_FAILT = "N";
	
	/**
	 * 响应状态
	 */
	private String status = RESULT_SUCCESS;
	
	/**
	 * 响应数据
	 */
	private Object data;
	
	/**
	 * 
	 * @return
	 */
	public static ResponResult success() {
		return new ResponResult();
	}
	
	/**
	 * 
	 * @param o
	 * @return
	 */
	public static ResponResult success( Object o ) {
		ResponResult r = new ResponResult();
		r.setData( o );
		return r;
	}
	
	/**
	 * 
	 * @param o
	 * @return
	 */
	public static ResponResult fail( Object o ) {
		ResponResult r = new ResponResult();
		r.setStatus( RESULT_FAILT );
		r.setData( o );
		return r;
	}
	
	/**
	 * 
	 * @return
	 */
	public static ResponResult fail(  ) {
		ResponResult r = new ResponResult();
		r.setStatus( RESULT_FAILT );
		return r;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public Object getData() {
		return data;
	}

	public void setData(Object data) {
		this.data = data;
	}
	
	

}
